package com.trans.anno;

import com.trans.interf.ResultHandle;
import org.apache.hc.client5.http.classic.methods.HttpGet;
import org.apache.hc.core5.http.HttpRequestInterceptor;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @Author xwduo
 * @Date 2023-10-07 08:53
 * 4、请求方式
 * 5、入参名 idList:[]
 * 6、返回类？
 * 7、targetField？
 */
@Target({ElementType.FIELD,ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface RemoteRequest {

    @Info("路径")
    String url();

    @Info("GET/POST/....")
    String methodName() default HttpGet.METHOD_NAME;

    @Info("返回类")
    Class<? extends ResultHandle> resultHandle();

    @Info("获取字段名")
    String[] targetField();

    @Info("请求名称")
    String paramsName() default "idList";

    Class<? extends HttpRequestInterceptor>[] interceptor() default {};
}
